package com.main.beatit;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Display;
import android.view.WindowManager;
import android.widget.*;
import android.widget.ImageView.ScaleType;

public class ContactKim extends Activity {
	Display display; // Device display information
	int displayWidth;
	int displayHeight;

	ImageView ivFace;
	TextView tvContent;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.aboutkim);

		try {
			// I don't use auto sleep mode.
			getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

			// Get a display information.
			display = ((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay();

			displayWidth = display.getWidth();
			displayHeight = display.getHeight();

			ivFace = (ImageView) findViewById(R.id.ivCntFace);
			tvContent = (TextView) findViewById(R.id.tvCntContent);

			LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) ivFace.getLayoutParams();
			params.width = displayHeight * 9 / 10;
			params.height = displayHeight * 9 / 10;
			ivFace.setLayoutParams(params);

			tvContent.setText("- Kim Jun-Woo\n\n" + "- I'm at \n  Busan, South Korea\n\n" + "- e-mail : \n  kimdatagoon@gmail.com\n\n");
			tvContent.setTextSize(displayHeight / 35);
		} catch (Exception e) {
			Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();
		}
	}
}
